package com.itheima.classloader;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/*
使用类加载器加载配置文件
 */
public class Demo02 {


    public static void main(String[] args) throws IOException {
        ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
        InputStream is = systemClassLoader.getResourceAsStream("prop.properties");
        InputStream is2 = ClassLoader.getSystemResourceAsStream("prop.properties");

        Properties properties = new Properties();
        properties.load(is2);
        System.out.println(properties);

    }

}
